/**
 * Author(s): xuming.Wong <xuming.Wong@gmail.com>
 */
#include "MapTile.h"
#include "WOWArchive.h"

namespace PQGame
{
	MapTile::MapTile(int index,int col,int row)
		: _index(index),_col(col),_row(row)
	{
		_file=SWOWArchive.getAdtFile(index,col,row);

		for(int i=0;i<16*16;i++){
			_chunks[i]=new MapChunk(i,_file,col,row);
			float* heights=_chunks[i]->getHeights();
			for(int j=0;j<9*9;j++){
				int index=i*9*9+j;
				_heights[index]=heights[j];
			}

		}
	}

}
